$(function () {
  $("header h4").text("国内折扣");
  let params = locationParam();

  $.ajax({
    url: "http://chst.vip:1234/api/getdiscountproduct",
    data: { productid: params.productid },
    success: (res) => {
      let item = res.result[0];
      let productImgSm = /http:\/\/a.{1,}g/.exec(item.productImgSm);
      let productImgSmAlt = /alt=".{1,}\w/g.exec(item.productImgSm);
      $("header").after(`
      <section id="product">
      <ul class="info">
        <li>
          <div class="infoR">
            <div class="title">
              <h4>${item.productName}</h4>
            </div>
            <div class="other">
              <span class="mall fl">${item.productFrom} | ${item.productTime}</span>
              <i>${item.productTips}</i>
            </div>
            <div class="container">
              <p>
              ${item.productInfo}
              </p>
              ${item.productImg}
            </div>
          </div>
        </li>
      </ul>
      </section>
        `);
      $("#comment").html(`${item.productComment}`);
    },
  });
});
